package com.pope.framework.util;

/**
 * 存储用户TOKEN
 * @author zhang
 *
 */
public class TokenContext {
	 private static ThreadLocal<String> holder = new ThreadLocal<>();
	 private static ThreadLocal<Integer> site = new ThreadLocal<>();
	 private static ThreadLocal<Integer> app = new ThreadLocal<>();
	 private static ThreadLocal<Integer> staff = new ThreadLocal<>();
	 
    public static Integer getStaff() {
        return staff.get();
    }

    public static void removeStaff() {
    	staff.remove();
    }
    
    public static void putStaff(Integer s) {
    	staff.set(s);
    }
	 
	    public static Integer getApp() {
	        return app.get();
	    }

	    public static void removeApp() {
	    	app.remove();
	    }
	    
	    public static void putApp(Integer s) {
	    	app.set(s);
	    }
	    
	    
	    public static Integer getSite() {
	        return site.get();
	    }

	    public static void removeSite() {
	    	site.remove();
	    }
	    
	    public static void putSite(Integer s) {
	    	site.set(s);
	    }

	    public static String getToken() {
	        return holder.get();
	    }

	    public static void removeToken() {
	        holder.remove();
	    }
	    
	    public static void putToken(String s) {
	        holder.set(s);
	    }

}
